<!DOCTYPE html>
<html>

  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<meta http-equiv="Cache-Control" content="no-siteapp" />

    <title>tbox数据位操作接口的使用</title>
    <meta name="description" content="tbox对于数据文件的解析提供了完善的支持，可以对各种二进制数据，文件数据流，网络数据流等进行各种解析操作并且提供了一整套字节解析、比特位解析的接口，来支持各种流模式：stream通用数据流，提供对流式数据的读写和解析，支持多层流嵌套以及各种协议（http, socket, file, data …）对于如何使用...">

    
    <meta name="keywords" content="tbox,位运算,stream,数据流,静态流,bits,tboox" /> 

    <!-- qq oauth -->
    <meta property="qc:admins" content="5211601217706727767255" />

    <!--icon -->
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
    <link rel="icon" sizes="192x192" href="/static/img/nice-highres.png" />
	<link rel="apple-touch-icon-precomposed" href="/static/img/apple-touch-icon-57x57-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/static/img/apple-touch-icon-72x72-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/static/img/apple-touch-icon-114x114-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/static/img/apple-touch-icon-144x144-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="180x180" href="/static/img/retinahd_icon.png" />
	<meta name="msapplication-TileImage" content="/static/img/retinahd_icon.png" />
	
    <link rel="stylesheet" href=" /css/fontawesome/css/font-awesome.min.css ">
    <link rel="stylesheet" href=" /css/main.css ">
    <link rel="canonical" href="https://tboox.org/cn/2016/08/12/bits-operation/">
    <link rel="alternate" type="application/rss+xml" title="TBOOX Open Source Project" href="https://tboox.org/feed.xml ">
    <link rel="alternate" hreflang="en" href="https://tboox.org/" />
    <link rel="alternate" hreflang="zh-Hans" href="https://tboox.org/cn/" />

    <!-- css -->
    <link href="/css/reward.css" rel="stylesheet" type="text/css"> 




    <script type="text/javascript">
    function isPC(){    
        var userAgentInfo = navigator.userAgent;  
        var Agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod");    
        var flag = true;    
        for (var v = 0; v < Agents.length; v++) {    
            if (userAgentInfo.indexOf(Agents[v]) > 0) { flag = false; break; }    
        }    
        return flag;    
    }
    </script>

<!-- baidu ads -->



    <!-- baidu ads -->

</head>


  <body>

    <header id="top">
    <div class="wrapper">
        <a href="/cn" class="brand">TBOOX</a>
        <button id="headerMenu" class="menu"><i class="fa fa-bars"></i></button>
        <nav id="headerNav">
            <ul>
                <li>
                    
                    <a href="/?lang=0">
                    
                        <i class="fa fa-home"></i>English
                    </a>
                </li>

                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/project/">
                            
                        
                            <i class="fa fa-bookmark"></i>项目
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/archive/">
                            
                        
                            <i class="fa fa-archive"></i>归档
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/category/">
                            
                        
                            <i class="fa fa-th-list"></i>分类
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/tag/">
                            
                        
                            <i class="fa fa-tags"></i>标记
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/docs/">
                            
                        
                            <i class="fa fa-book"></i>文档
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="https://xmake.io/#/zh-cn/about/contact" target="_blank" >
                            
                        
                            <i class="fa fa-forumbee"></i>社区
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/donation/">
                            
                        
                            <i class="fa fa-heart"></i>捐助
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/about/">
                            
                        
                            <i class="fa fa-user"></i>关于
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                    
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            </ul>
        </nav>
    </div>
</header>



        <div class="page clearfix" post>
    <div class="left">
        <h1>tbox数据位操作接口的使用</h1>
        <div class="label">

            <div class="label-card">
                <i class="fa fa-calendar"></i>2016-08-12
            </div>

            <div class="label-card">
                
            </div>

            <div class="label-card">
                
            </div>

            <div class="label-card">
            


<!-- <span class="point">•</span> -->
<span class="categories">
  <i class="fa fa-th-list"></i>
  
    
        <a href="/category/#tbox" title="Category: tbox" rel="category">tbox</a>
    
  

  <!-- <span class="point">•</span> -->
</span>


            </div>

            <div class="label-card">
            
<!-- <span class="point">•</span> -->
<span class="pageTag">
  <i class="fa fa-tags"></i>
  
    
        <!--a href="/tag/#tbox" title="Tag: tbox" rel="tag">tbox</a-->
        <a href="/cn/tag/#tbox" title="Tag: tbox" rel="tag">tbox</a>&nbsp;
    
        <!--a href="/tag/#%E4%BD%8D%E8%BF%90%E7%AE%97" title="Tag: 位运算" rel="tag">位运算</a-->
        <a href="/cn/tag/#位运算" title="Tag: 位运算" rel="tag">位运算</a>&nbsp;
    
        <!--a href="/tag/#stream" title="Tag: stream" rel="tag">stream</a-->
        <a href="/cn/tag/#stream" title="Tag: stream" rel="tag">stream</a>&nbsp;
    
        <!--a href="/tag/#%E6%95%B0%E6%8D%AE%E6%B5%81" title="Tag: 数据流" rel="tag">数据流</a-->
        <a href="/cn/tag/#数据流" title="Tag: 数据流" rel="tag">数据流</a>&nbsp;
    
        <!--a href="/tag/#%E9%9D%99%E6%80%81%E6%B5%81" title="Tag: 静态流" rel="tag">静态流</a-->
        <a href="/cn/tag/#静态流" title="Tag: 静态流" rel="tag">静态流</a>&nbsp;
    
        <!--a href="/tag/#bits" title="Tag: bits" rel="tag">bits</a-->
        <a href="/cn/tag/#bits" title="Tag: bits" rel="tag">bits</a>
    
  

</span>

            </div>

        </div>
        <hr>
        <article itemscope itemtype="http://schema.org/BlogPosting">
        <p>tbox对于数据文件的解析提供了完善的支持，可以对各种二进制数据，文件数据流，网络数据流等进行各种解析操作</p>

<p>并且提供了一整套字节解析、比特位解析的接口，来支持各种流模式：</p>

<h4 id="stream">stream</h4>

<p>通用数据流，提供对流式数据的读写和解析，支持多层流嵌套以及各种协议（http, socket, file, data …）</p>

<p>对于如何使用stream，这里暂时不详细介绍了，之后会单独重点介绍下，这里主要是为了描述，如何使用stream来处理字节数据的解析</p>

<p>例如，我要从数据流中，读取一个大端的16bits数值，很简单，只要：</p>

<div class="language-c highlighter-rouge"><pre class="highlight"><code><span class="n">tb_uint16_t</span> <span class="n">value</span><span class="p">;</span>
<span class="k">if</span> <span class="p">(</span><span class="n">tb_stream_bread_u16_be</span><span class="p">(</span><span class="n">stream</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">value</span><span class="p">))</span>
<span class="p">{</span>
    <span class="n">tb_trace_i</span><span class="p">(</span><span class="s">"%x"</span><span class="p">,</span> <span class="n">value</span><span class="p">);</span>
<span class="p">}</span>
</code></pre>
</div>

<p>其中后缀<code class="highlighter-rouge">_be</code>, <code class="highlighter-rouge">_le</code>以及<code class="highlighter-rouge">_ne</code> 分别表示，大端读取、小端读取、本地端读取</p>

<p>如果需要读取32位、64位数据，只需要将<code class="highlighter-rouge">u16</code>改成<code class="highlighter-rouge">u32</code>或者<code class="highlighter-rouge">u64</code>就行了，是不是很方便啊，并且stream还可以支持浮点、双精度数值的各端读取。。</p>

<p>这里我就不一一介绍了，具体的接口列表，可以参看本文最后的接口列表。</p>

<h4 id="static_stream">static_stream</h4>

<p>static_stream的接口跟stream是类似的，用法就不重复描述了，这里主要说明下这个流跟stream的区别：</p>

<ul>
  <li>stream主要适用于通用数据流协议，功能强大，并且内置缓存，但是比较重量级</li>
  <li>static_stream仅用于维护静态的数据buffer，以及读写、解析操作，比较轻量，效率也更高</li>
</ul>

<p>下面给个简单的例子：</p>

<div class="language-c highlighter-rouge"><pre class="highlight"><code><span class="c1">// 读取sint64的数值，本地端读取
</span><span class="n">tb_sint64_t</span> <span class="n">value</span><span class="p">;</span>
<span class="k">if</span> <span class="p">(</span><span class="n">tb_static_stream_read_s64_ne</span><span class="p">(</span><span class="n">stream</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">value</span><span class="p">))</span>
<span class="p">{</span>
    <span class="n">tb_trace_i</span><span class="p">(</span><span class="s">"%llx"</span><span class="p">,</span> <span class="n">value</span><span class="p">);</span>
<span class="p">}</span>
</code></pre>
</div>

<h4 id="bits">bits</h4>

<p>tbox还提供了更加原始、更加底层的位数据操作接口，例如直接对某个数据指针的位读取操作，可以使用utils库的<code class="highlighter-rouge">tb_bits_get_xxx</code>和<code class="highlighter-rouge">tb_bits_set_xxx</code>系列接口， 这个更加的轻量：</p>

<div class="language-c highlighter-rouge"><pre class="highlight"><code>    <span class="c1">// p指向某个数据地址
</span>    <span class="n">tb_byte_t</span><span class="o">*</span> <span class="n">p</span> <span class="o">=</span> <span class="n">data</span><span class="p">;</span>

    <span class="c1">// 按大端读取16位数据
</span>    <span class="n">tb_uint16_t</span> <span class="n">u16_be</span> <span class="o">=</span> <span class="n">tb_bits_get_u16_be</span><span class="p">(</span><span class="n">p</span><span class="p">);</span>

    <span class="c1">// 按小端读取24位数据
</span>    <span class="n">tb_uint32_t</span> <span class="n">u24_le</span> <span class="o">=</span> <span class="n">tb_bits_get_u24_le</span><span class="p">(</span><span class="n">p</span><span class="p">);</span>

    <span class="c1">// 按本地端读取32位数据
</span>    <span class="n">tb_uint32_t</span> <span class="n">u32_ne</span> <span class="o">=</span> <span class="n">tb_bits_get_u32_ne</span><span class="p">(</span><span class="n">p</span><span class="p">);</span>

    <span class="c1">// 按大端读取64位数据
</span>    <span class="n">tb_uint64_t</span> <span class="n">u64_be</span> <span class="o">=</span> <span class="n">tb_bits_get_u64_be</span><span class="p">(</span><span class="n">p</span><span class="p">);</span>

    <span class="c1">// 读取从第1位开始的后续5位无符号数据
</span>    <span class="n">tb_uint32_t</span> <span class="n">u5</span> <span class="o">=</span> <span class="n">tb_bits_get_ubits32</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">5</span><span class="p">);</span>

    <span class="c1">// 按大端读取浮点值
</span>    <span class="n">tb_float_t</span> <span class="n">float_be</span> <span class="o">=</span> <span class="n">tb_bits_get_float_be</span><span class="p">(</span><span class="n">p</span><span class="p">);</span>

    <span class="c1">// 按浮点大端、字小端读取双精度浮点值
</span>    <span class="n">tb_double_t</span> <span class="n">double_ble</span> <span class="o">=</span> <span class="n">tb_bits_get_double_ble</span><span class="p">(</span><span class="n">p</span><span class="p">);</span>

    <span class="c1">// 按浮点本地端、字本地端读取双精度浮点值
</span>    <span class="n">tb_double_t</span> <span class="n">double_nne</span> <span class="o">=</span> <span class="n">tb_bits_get_double_nne</span><span class="p">(</span><span class="n">p</span><span class="p">);</span>

    <span class="c1">// 交换无符号16位数值
</span>    <span class="n">u16</span> <span class="o">=</span> <span class="n">tb_bits_swap_u16</span><span class="p">(</span><span class="n">u16</span><span class="p">);</span>

    <span class="c1">// 交换无符号32位数值
</span>    <span class="n">u32</span> <span class="o">=</span> <span class="n">tb_bits_swap_u32</span><span class="p">(</span><span class="n">u32</span><span class="p">);</span>

    <span class="c1">// 交换无符号64位数值
</span>    <span class="n">u64</span> <span class="o">=</span> <span class="n">tb_bits_swap_u64</span><span class="p">(</span><span class="n">u64</span><span class="p">);</span>

    <span class="c1">// 将本地端的u32数值转为大端u32数值
</span>    <span class="n">u32_be</span> <span class="o">=</span> <span class="n">tb_bits_ne_to_be_u32</span><span class="p">(</span><span class="n">u32_ne</span><span class="p">);</span>

    <span class="c1">// 将小端的u64值转为大端u64数值
</span>    <span class="n">u64_be</span> <span class="o">=</span> <span class="n">tb_bits_ne_to_be_u32</span><span class="p">(</span><span class="n">u64_le</span><span class="p">);</span>

    <span class="c1">// 按大端顺序获取u32的前导0的位数
</span>    <span class="n">count</span> <span class="o">=</span> <span class="n">tb_bits_cl0_u32_be</span><span class="p">(</span><span class="n">val</span><span class="p">);</span>

    <span class="c1">// 按小端顺序获取u64的前导1的位数
</span>    <span class="n">count</span> <span class="o">=</span> <span class="n">tb_bits_cl1_u64_le</span><span class="p">(</span><span class="n">val</span><span class="p">);</span>

    <span class="c1">// 按大端顺序获取u32的第一个位0的索引位置
</span>    <span class="n">index</span> <span class="o">=</span> <span class="n">tb_bits_fl0_u32_be</span><span class="p">(</span><span class="n">val</span><span class="p">);</span>

    <span class="c1">// 按小端顺序获取u64的第一个位1的索引位置
</span>    <span class="n">index</span> <span class="o">=</span> <span class="n">tb_bits_fl1_u64_le</span><span class="p">(</span><span class="n">val</span><span class="p">);</span>

    <span class="c1">// 获取u32的位0的总数
</span>    <span class="n">count</span> <span class="o">=</span> <span class="n">tb_bits_cb0_u32</span><span class="p">(</span><span class="n">val</span><span class="p">);</span>

    <span class="c1">// 获取u63的位1的总数
</span>    <span class="n">count</span> <span class="o">=</span> <span class="n">tb_bits_cb1_u64</span><span class="p">(</span><span class="n">val</span><span class="p">);</span>
</code></pre>
</div>

<p>其中此处的大部分接口，都进行过大量的优化，相当高效。</p>

<p>因此，如果能够充分利用tbox的stream, static_stream, bits的各种解析特性，去处理和解析各种二进制文件，是非常方便的，并且也非常高效。</p>

<p>而且也是跨平台支持，我们不需要关心某些平台是否能够处理地址非对齐时候的数值提取，这些tbox内部都会自动一最优的方式处理</p>

<p>tbox也会利用一些编译器特性、cpu架构上的特性，针对不同架构进行各种优化，已达到较为满意的解析效率。</p>

<p>如果解析的数据量非常大，stream内置的自动cache读写，可以充分优化io读写性能，在大量数值解析时候，减少频繁的文件读写操作。。</p>

<h4 id="附加stream数值读写接口列表">附加stream数值读写接口列表</h4>

<div class="language-c highlighter-rouge"><pre class="highlight"><code><span class="cm">/*! block read uint8 integer
 *
 * @param stream        the stream
 * @param pvalue        the value pointer
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bread_u8</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_uint8_t</span><span class="o">*</span> <span class="n">pvalue</span><span class="p">);</span>

<span class="cm">/*! block read sint8 integer
 *
 * @param stream        the stream
 * @param pvalue        the value pointer
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bread_s8</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_sint8_t</span><span class="o">*</span> <span class="n">pvalue</span><span class="p">);</span>

<span class="cm">/*! block read uint16-le integer
 *
 * @param stream        the stream
 * @param pvalue        the value pointer
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bread_u16_le</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_uint16_t</span><span class="o">*</span> <span class="n">pvalue</span><span class="p">);</span>

<span class="cm">/*! block read sint16-le integer
 *
 * @param stream        the stream
 * @param pvalue        the value pointer
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bread_s16_le</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_sint16_t</span><span class="o">*</span> <span class="n">pvalue</span><span class="p">);</span>

<span class="cm">/*! block read uint24-le integer
 *
 * @param stream        the stream
 * @param pvalue        the value pointer
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bread_u24_le</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_uint32_t</span><span class="o">*</span> <span class="n">pvalue</span><span class="p">);</span>

<span class="cm">/*! block read sint24-le integer
 *
 * @param stream        the stream
 * @param pvalue        the value pointer
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bread_s24_le</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_sint32_t</span><span class="o">*</span> <span class="n">pvalue</span><span class="p">);</span>

<span class="cm">/*! block read uint32-le integer
 *
 * @param stream        the stream
 * @param pvalue        the value pointer
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bread_u32_le</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_uint32_t</span><span class="o">*</span> <span class="n">pvalue</span><span class="p">);</span>

<span class="cm">/*! block read sint32-le integer
 *
 * @param stream        the stream
 * @param pvalue        the value pointer
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bread_s32_le</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_sint32_t</span><span class="o">*</span> <span class="n">pvalue</span><span class="p">);</span>

<span class="cm">/*! block read uint64-le integer
 *
 * @param stream        the stream
 * @param pvalue        the value pointer
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bread_u64_le</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_uint64_t</span><span class="o">*</span> <span class="n">pvalue</span><span class="p">);</span>

<span class="cm">/*! block read sint64-le integer
 *
 * @param stream        the stream
 * @param pvalue        the value pointer
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bread_s64_le</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_sint64_t</span><span class="o">*</span> <span class="n">pvalue</span><span class="p">);</span>

<span class="cm">/*! block read uint16-be integer
 *
 * @param stream        the stream
 * @param pvalue        the value pointer
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bread_u16_be</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_uint16_t</span><span class="o">*</span> <span class="n">pvalue</span><span class="p">);</span>

<span class="cm">/*! block read sint16-be integer
 *
 * @param stream        the stream
 * @param pvalue        the value pointer
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bread_s16_be</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_sint16_t</span><span class="o">*</span> <span class="n">pvalue</span><span class="p">);</span>

<span class="cm">/*! block read uint24-be integer
 *
 * @param stream        the stream
 * @param pvalue        the value pointer
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bread_u24_be</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_uint32_t</span><span class="o">*</span> <span class="n">pvalue</span><span class="p">);</span>

<span class="cm">/*! block read sint24-be integer
 *
 * @param stream        the stream
 * @param pvalue        the value pointer
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bread_s24_be</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_sint32_t</span><span class="o">*</span> <span class="n">pvalue</span><span class="p">);</span>

<span class="cm">/*! block read uint32-be integer
 *
 * @param stream        the stream
 * @param pvalue        the value pointer
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bread_u32_be</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_uint32_t</span><span class="o">*</span> <span class="n">pvalue</span><span class="p">);</span>

<span class="cm">/*! block read sint32-be integer
 *
 * @param stream        the stream
 * @param pvalue        the value pointer
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bread_s32_be</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_sint32_t</span><span class="o">*</span> <span class="n">pvalue</span><span class="p">);</span>

<span class="cm">/*! block read uint64-be integer
 *
 * @param stream        the stream
 * @param pvalue        the value pointer
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bread_u64_be</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_uint64_t</span><span class="o">*</span> <span class="n">pvalue</span><span class="p">);</span>

<span class="cm">/*! block read sint64-be integer
 *
 * @param stream        the stream
 * @param pvalue        the value pointer
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bread_s64_be</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_sint64_t</span><span class="o">*</span> <span class="n">pvalue</span><span class="p">);</span>

<span class="cm">/*! block writ uint8 integer
 *
 * @param stream        the stream
 * @param value         the value
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bwrit_u8</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_uint8_t</span> <span class="n">value</span><span class="p">);</span>

<span class="cm">/*! block writ sint8 integer
 *
 * @param stream        the stream
 * @param value         the value
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bwrit_s8</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_sint8_t</span> <span class="n">value</span><span class="p">);</span>

<span class="cm">/*! block writ uint16-le integer
 *
 * @param stream        the stream
 * @param value         the value
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bwrit_u16_le</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_uint16_t</span> <span class="n">value</span><span class="p">);</span>

<span class="cm">/*! block writ sint16-le integer
 *
 * @param stream        the stream
 * @param value         the value
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bwrit_s16_le</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_sint16_t</span> <span class="n">value</span><span class="p">);</span>

<span class="cm">/*! block writ uint24-le integer
 *
 * @param stream        the stream
 * @param value         the value
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bwrit_u24_le</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_uint32_t</span> <span class="n">value</span><span class="p">);</span>

<span class="cm">/*! block writ sint24-le integer
 *
 * @param stream        the stream
 * @param value         the value
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bwrit_s24_le</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_sint32_t</span> <span class="n">value</span><span class="p">);</span>

<span class="cm">/*! block writ uint32-le integer
 *
 * @param stream        the stream
 * @param value         the value
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bwrit_u32_le</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_uint32_t</span> <span class="n">value</span><span class="p">);</span>

<span class="cm">/*! block writ sint32-le integer
 *
 * @param stream        the stream
 * @param value         the value
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bwrit_s32_le</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_sint32_t</span> <span class="n">value</span><span class="p">);</span>

<span class="cm">/*! block writ uint64-le integer
 *
 * @param stream        the stream
 * @param value         the value
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bwrit_u64_le</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_uint64_t</span> <span class="n">value</span><span class="p">);</span>

<span class="cm">/*! block writ sint64-le integer
 *
 * @param stream        the stream
 * @param value         the value
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bwrit_s64_le</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_sint64_t</span> <span class="n">value</span><span class="p">);</span>

<span class="cm">/*! block writ uint16-be integer
 *
 * @param stream        the stream
 * @param value         the value
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bwrit_u16_be</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_uint16_t</span> <span class="n">value</span><span class="p">);</span>

<span class="cm">/*! block writ sint16-be integer
 *
 * @param stream        the stream
 * @param value         the value
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bwrit_s16_be</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_sint16_t</span> <span class="n">value</span><span class="p">);</span>

<span class="cm">/*! block writ uint24-be integer
 *
 * @param stream        the stream
 * @param value         the value
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bwrit_u24_be</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_uint32_t</span> <span class="n">value</span><span class="p">);</span>

<span class="cm">/*! block writ sint24-be integer
 *
 * @param stream        the stream
 * @param value         the value
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bwrit_s24_be</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_sint32_t</span> <span class="n">value</span><span class="p">);</span>

<span class="cm">/*! block writ uint32-be integer
 *
 * @param stream        the stream
 * @param value         the value
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bwrit_u32_be</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_uint32_t</span> <span class="n">value</span><span class="p">);</span>

<span class="cm">/*! block writ sint32-be integer
 *
 * @param stream        the stream
 * @param value         the value
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bwrit_s32_be</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_sint32_t</span> <span class="n">value</span><span class="p">);</span>

<span class="cm">/*! block writ uint64-be integer
 *
 * @param stream        the stream
 * @param value         the value
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bwrit_u64_be</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_uint64_t</span> <span class="n">value</span><span class="p">);</span>

<span class="cm">/*! block writ sint64-be integer
 *
 * @param stream        the stream
 * @param value         the value
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bwrit_s64_be</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_sint64_t</span> <span class="n">value</span><span class="p">);</span>

<span class="cp">#ifdef TB_CONFIG_TYPE_HAVE_FLOAT
</span>
<span class="cm">/*! read float-le number
 *
 * @param stream        the stream
 * @param pvalue        the value pointer
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bread_float_le</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_float_t</span><span class="o">*</span> <span class="n">pvalue</span><span class="p">);</span>

<span class="cm">/*! read float-be number
 *
 * @param stream        the stream
 * @param pvalue        the value pointer
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bread_float_be</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_float_t</span><span class="o">*</span> <span class="n">pvalue</span><span class="p">);</span>

<span class="cm">/*! read double-ble number
 *
 * @param stream        the stream
 * @param pvalue        the value pointer
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bread_double_ble</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_double_t</span><span class="o">*</span> <span class="n">pvalue</span><span class="p">);</span>

<span class="cm">/*! read double-bbe number
 *
 * @param stream        the stream
 * @param pvalue        the value pointer
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bread_double_bbe</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_double_t</span><span class="o">*</span> <span class="n">pvalue</span><span class="p">);</span>

<span class="cm">/*! read double-lle number
 *
 * @param stream        the stream
 * @param pvalue        the value pointer
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bread_double_lle</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_double_t</span><span class="o">*</span> <span class="n">pvalue</span><span class="p">);</span>

<span class="cm">/*! read double-lbe number
 *
 * @param stream        the stream
 * @param pvalue        the value pointer
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bread_double_lbe</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_double_t</span><span class="o">*</span> <span class="n">pvalue</span><span class="p">);</span>

<span class="cm">/*! writ float-le number
 *
 * @param stream        the stream
 * @param value         the value
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bwrit_float_le</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_float_t</span> <span class="n">value</span><span class="p">);</span>

<span class="cm">/*! writ float-be number
 *
 * @param stream        the stream
 * @param value         the value
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bwrit_float_be</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_float_t</span> <span class="n">value</span><span class="p">);</span>

<span class="cm">/*! writ double-ble number
 *
 * @param stream        the stream
 * @param value         the value
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bwrit_double_ble</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_double_t</span> <span class="n">value</span><span class="p">);</span>

<span class="cm">/*! writ double-bbe number
 *
 * @param stream        the stream
 * @param value         the value
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bwrit_double_bbe</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_double_t</span> <span class="n">value</span><span class="p">);</span>

<span class="cm">/*! writ double-lle number
 *
 * @param stream        the stream
 * @param value         the value
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bwrit_double_lle</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_double_t</span> <span class="n">value</span><span class="p">);</span>

<span class="cm">/*! writ double-lbe number
 *
 * @param stream        the stream
 * @param value         the value
 *
 * @return              tb_true or tb_false
 */</span>
<span class="n">tb_bool_t</span>               <span class="n">tb_stream_bwrit_double_lbe</span><span class="p">(</span><span class="n">tb_stream_ref_t</span> <span class="n">stream</span><span class="p">,</span> <span class="n">tb_double_t</span> <span class="n">value</span><span class="p">);</span>

<span class="cp">#endif
</span></code></pre>
</div>

        </article>
        <hr>

        <!-- baidu ads -->
        

        <!-- reward -->
        <div style="text-align: center;">
            <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
              <span>赏</span>
            </button>
            <div id="QR" style="display: none;">
                <div id="wechat" style="display: inline-block">
                  <img id="wechat_qr" src="/static/img/weixin.png" alt="WeChat Pay"/>
                  <p>微信打赏</p>
                </div>
                <div id="alipay" style="display: inline-block">
                  <img id="alipay_qr" src="/static/img/alipay.png" alt="Alipay"/>
                  <p>支付宝打赏</p>
                </div>
            </div>
        </div>

        
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
        

        
        
            
        
            
            
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
            
        
            
        
            
            
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
            
        
            
        
            
            
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
            
        
            
        
            
            
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
            
        
            
        
            
            
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            
            
        
        

        <div class="post-recent">
    <div class="pre">

        

        

        
        
        <p><strong>上一篇</strong> <a href="/cn/2016/08/08/variables-usage/">xmake内建变量和外置变量的使用</a></p>
        
    </div>

    <div class="nex">

        

        

        
        
        <p><strong>下一篇</strong> <a href="/cn/2016/08/12/generate-vs2008-project/">xmake支持vs2008生成</a></p>
        
    </div>
</div>


        <h2 id="comments">评论</h2>
        






<div id="gitalk-container"></div>
<link rel="stylesheet" href="/css/gitalk.css">
<script src="/js/gitalk.min.js"></script>

<script>
const gitalk = new Gitalk({
  clientID: '73946dc1d9e2276ad0da',
  clientSecret: '12a3cb94361ba3ebc6ecb68cf80d592bfaa8106d',
  repo: 'tboox.github.io',
  owner: 'waruqi',
  admin: ['waruqi'],
  id: location.pathname,       
  language: 'zh-CN',
  distractionFreeMode: false  
})

gitalk.render('gitalk-container')
</script>





    </div>
    <button class="anchor"><i class="fa fa-anchor"></i></button>
    <div class="right">
        <div class="wrap">

            <!-- codefund ads -->
            

            <!-- Content -->
            <div class="side content">
                <div>
                    内容
                </div>
                <ul id="content-side" class="content-ul">
                    <li><a href="#english">English</a></li>
                    <li><a href="#similar_posts">相关文章</a></li>
                    <li><a href="#comments">评论</a></li>
                </ul>
            </div>


            <!-- baidu ads -->
            
            
            <br>
            <div class="side">
                <div>
                    <i class="fa fa-external-link"></i>
                    链接
                </div>
                <ul class="content-ul">
                  <li><a href="http://github.com/waruqi/tbox">tbox</a></li>
                  <li><a href="http://www.xmake.io">xmake</a></li>
                  <li><a href="https://github.com/waruqi">github</a></li>
                </ul>
            </div> 

            <!-- xmake courses -->
            <br>
            <div class="side">
                <div>
                    <i class="fa fa-external-link"></i>
                    xmake 入门课程
                </div>
                <a href="https://xmake.io/#/zh-cn/about/course" target="_blank">
                <img src="/static/img/xmake-course.png" alt="course" width="256" height="193">
                </a>
            </div>

            <!-- qqgroup -->
            <br>
            <div class="side">
                <div>
                    <i class="fa fa-external-link"></i>
                    技术交流群（QQ）
                </div>
                <img src="/static/img/qqgroup.png" alt="qqgroup" width="256" height="284">
            </div> 

            <!-- google ads -->
            

            <!-- baidu ads -->
            

        </div>
    </div>

    <!-- baidu ads -->
    
</div>
<script>
/**
 * target _blank
 */
(function() {
    var aTags = document.querySelectorAll('article a:not([id])')
    for (var i = 0; i < aTags.length; i++) {
        aTags[i].setAttribute('target', '_blank')
    }
}());
</script>
<script src="/js/pageContent.js " charset="utf-8"></script>



    <footer class="site-footer">
    <div class="wrapper">
        <p class="description">
             Copyright (c) 2016-2020 tboox.org 
        </p>
        <p class="contact">
            
            <a href="https://github.com/waruqi" title="GitHub"><i class="fa fa-github" aria-hidden="true"></i></a> 
             
            
            <a href="mailto:waruqi@gmail.com" title="email"><i class="fa fa-envelope-o" aria-hidden="true"></i></a> 
            
            
            <a href="https://twitter.com/waruqi" title="Twitter"><i class="fa fa-twitter" aria-hidden="true"></i></a> 
            
            <a href="/feed.xml" title="feed"><i class="fa fa-feed" aria-hidden="true"></i></a> 
        </p>
        <p class="power">
            <span>
                Site powered by <a href="https://jekyllrb.com/">Jekyll</a> & <a href="https://github.com/Gaohaoyang">HyG</a> & <a href="https://pages.github.com/">Github Pages</a>.
            </span>
        </p>
    </div>
</footer>

    <div class="back-to-top">
    <a href="#top" class="scroll">
        <i class="fa fa-arrow-up" aria-hidden="true"></i>
    </a>
</div>

    <script src=" /js/main.js " charset="utf-8"></script>
    <script src=" /js/scroll.min.js " charset="utf-8"></script>
  </body>

</html>
